<template>
	<view class="textbody">
		<textarea class="textarea" maxlength='90' v-model="txt" placeholder="请输入您的思念和祝福…"
			:style="{backgroundImage:'url('+ txtimg +')'}" @input="descInput" />
		<view class="demnum">
			{{demnum}}/90
		</view>
		<view class="incon">
			<uni-icons custom-prefix="close" type="close" size="30" color="#6A3C16" @click="black"></uni-icons>
		</view>
		
	</view>
</template>

<script>
	import {imgBaseUrl} from '../../../../utils/baseUrl'
	export default {
		data() {
			return {
				txt: '',
				demnum: '0',
				txtimg: imgBaseUrl + '/img/missimg/biaoqian.png'
			}
		},
		methods: {
			descInput(event) {
				this.demnum = event.target.value.length;
			},
			black(){
				this.$parent.Return();
			}
		}
	}
</script>

<style scoped lang="less">
	.textbody {
		width: 100%;

		.textarea {
			background-size: 100% 100%;
			width: 470rpx;
			padding: 80rpx 99rpx 110rpx 99rpx;
			height: 289rpx;
			line-height: 52rpx;
			font-size: 28rpx;
			color: #6A3C16;
			font-weight: 400;
			font-family: PingFang SC-Regular, PingFang SC;
		}

		.demnum {
			font-size: 22rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #6A3C16;
			position: absolute;
			z-index: 10000;
			right: 100rpx;
			margin-top: -44rpx;

		}
		.incon{
			position: absolute;
			z-index: 10000;
			right: 74rpx;
			top: 570rpx;
		}
	}
</style>